package cn.edu.ujn;

import javax.naming.InitialContext;
import javax.naming.NamingException;

public class test {
	public static void main(String[] args) throws NamingException {
		String name="ch19/HelloEJB!cn.edu.ujn.HelloEJBRemote";
		InitialContext context = new InitialContext();
		HelloEJBRemote hello = (HelloEJBRemote) context.lookup(name);
		System.out.println(hello.sayHello("luoaoxue"));
		
		
		
		User user = new User();
		user.setPassword("12345");
		user.setUsername("laoluo");
		System.out.println(hello.hello(user));
	}
}
